home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19980424-19980901
/
000331_news@newsmaster….columbia.edu _Sat Aug 1 15:40:06 1998.msg
< prev
next >
Wrap
Internet Message Format
|
1998-08-31
|
6KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id PAA28138
for <kermit.misc@watsun.cc.columbia.edu>; Sat, 1 Aug 1998 15:40:05 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id PAA11797
for kermit.misc@watsun; Sat, 1 Aug 1998 15:40:05 -0400 (EDT)
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Q: How to back up a DOS box to UNIX via Kermit?
Date: 1 Aug 1998 19:40:02 GMT
Organization: Columbia University
Lines: 113
Message-ID: <6pvqui$apt$1@apakabar.cc.columbia.edu>
References: <slrn6s4abl.ha5.charlie@pc.antipope.org> <6ptdbm$49p$1@apakabar.cc.columbia.edu> <slrn6s5qo9.jc1.charlie@pc.antipope.org>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.protocols.kermit.misc:9042
In article <slrn6s5qo9.jc1.charlie@pc.antipope.org>,
Charlie Stross <charlie @ nospam . antipope . org> wrote:
: In comp.protocols.kermit.misc, fdc@watsun.cc.columbia.edu wrote:
: >In article <slrn6s4abl.ha5.charlie@pc.antipope.org>,
: >Charlie Stross <charlie @ nospam . antipope . org> wrote:
: >:
: >: Is there some magic switch I can use to tell Kermit to create
: >: intermediate directories as needed, or is there a script somewhere
: >: to do just that? I want to preserve the directory structure of the
: >: DOS box when making the backup ...
: >:
: >You need C-Kermit 6.1 and MS-DOS Kermit 3.16 for this -- both currently
: >in Beta test. Is that what you have? Did you read the release notes
: >for both Beta versions on recursive transfers?
:
: I've got C-Kermit 6.1.193 Beta 05 at the Linux end, and DOS Kermit
: 3.16 Alpha 5 at the Win3.1 end.
:
: I've checked the release notes; I don't _think_ I've missed anything, but
: I still can't get it to create subdirectories on the receiving side.
:
: send /recursive /binary *.*
:
: from the DOS side to a UNIX server (receiving with /pathnames:relative),
: still dumps all the incoming files in the same directory, instead of
: creating subdirectories for each transferred file.
:
It turns out that MS-DOS Kermit (unlike C-Kermit or K95) has to be told to
include the pathname on outbound files when it is sending recursively;
otherwise, it leaves off the pathname, which explains why all the files are
ending up in the same directory on Linux.
So before starting the transfer, tell MS-DOS Kermit:
set send pathnames relative
cd <root-of-tree-to-be-backed-up>
connect
Then, in MS-DOS Kermit's terminal screen, tell Linux C-Kermit to:
set file type binary ; (Transfer mode is governed by the client)
cd <root-of-backup-tree>
get /recursive *
If MS-DOS Kermit has "terminal autodownload" enabled (as it does by default),
the transfer starts automatically and creates the backup tree on Linux as
expected.
Note the following differences:
1. In C-Kermit and K95, /RECURSIVE includes an implicit request for
relative pathnames, whereas MS-DOS Kermit must be told to include
or use pathnames explicitly. We'll look into changing this in the
next MS-DOS Kermit beta edit.
2. C-Kermit and K95 can do automatic per-file text/binary switching based
on the filename, but MS-DOS Kermit does not include this feature, and
so recursive transfers from MS-DOS Kermit should always be done in
binary mode.
: I'm mostly (a) starting kermit on the DOS box, (b) logging into the
: Linux server, (c) starting C-Kermit on the Linux side, and (d) issuing
: GET commands from there -- however I've also tried just sending files
: from the DOS side, with the Linux kermit in receive mode.
:
: Another thing I've tried:
:
: CGET /recursive { cat | tar czf scratch.tar.gz - } *.*
:
: doesn't work either. (This is GNU tar, which can read from standard input,
: so I would expect kermit to get files recursively, pipe them through cat,
: into tar's standard input, and tar to create an archive called
: scratch.tar.gz : on the receiving machine.)
:
You've got the operands backwards. It's:
cget /recursive *.* { cat | tar czf scratch.tar.gz - }
or:
get /recursive /command *.* { cat | tar czf scratch.tar.gz - }
or:
get /recursive /command /as:{ cat | tar czf scratch.tar.gz - } *.*
But it still will not do what you expect. Leaving Kermit out of it for a
moment... First of all:
cat * | gtar czf scratch.tar.gz -
makes the local copy of gtar say "gtar: can't add file - : No such file or
directory", so there's some problem with the syntax.
But assuming the syntax is OK for your version gtar, you'll still wind up
with an undistinguished stream of data fed into tar's standard input. Tar
can't tell it's really a series of files, and in any case would have no way
to know what the filenames are, let alone where one file ends and the next
one begins, so who knows what it will do?
Section 4.2.4 of ckermit2.upd describes ways to transfer directory trees
using tar (plus gzip or compress if desired), for example:
send /command:{tar cf - . | gzip -c} /as:{!gunzip -c | tar xf -}
or (in the other direction):
get /command {!tar cf - . | gzip -c} /as:{gunzip -c | tar xf -}
But these methods won't work with MS-DOS Kermit, because it does not
support file-transfer filters. (There's only so much you do in 300K!)
- Frank